import { defineAsyncComponent, AsyncComponentLoader } from "vue";
import AsyncLoading from "@/components/TLoading/asyncLoading.vue";

export const loadAsyncComponent = (loader: AsyncComponentLoader<any>) =>
  defineAsyncComponent({
    loader,
    loadingComponent: AsyncLoading,
    delay: 300
  });
